local other = require("other")
local class = reload("class")
local super = reload("super.basic")
local clear = reload("table.opt.clear")

---@class cacheUnit 缓存单元
---@class caches:super.basic @缓存
local this = class(super)

---构造
function this:ctor(min, max)
    super.ctor(self)
    ---@type cacheUnit[]
    self._caches = {}
end

---初始数据
function this:init()
    clear(self._caches)
end

---缓存
---@param cache table @数据
function this:dataPush(cache)
    local list = self._caches
    table.insert(list, {
        ocutime = other.nowmls(),
        cache = cache,
    })
end

return this
